// coding: utf-8
// @Author : lryself
// @Date : 2020/10/23 22:44
// @Software: GoLand

package main

func main() {
	
}


type ListNode struct {
	Val int
	Next *ListNode
}

func isPalindrome(head *ListNode) bool {
	int_list := []int{}
	for head!=nil{
		int_list= append(int_list, head.Val)
		head=head.Next
	}
	n:=len(int_list)
	if n>0{
		i:=0
		j:=n-1
		for i<j{
			if int_list[i]!=int_list[j]{
				return false
			}
			i++
			j--
		}
	}
	return true
}